<?php
//example 1 backup:
require_once('dbbak.class.php');
require_once('tablebak.class.php');
$connectid = mysql_connect('localhost','root','123456');
$backupDir = 'data';
$DbBak = new DbBak($connectid,$backupDir);
$DbBak->backupDb('mybbs');

?>

<?php
//恢复mybbs数据库：
require_once('dbbak.class.php');
require_once('tablebak.class.php');
$connectid = mysql_connect('localhost','root','123456');
$backupDir = 'data';
$DbBak = new DbBak($connectid,$backupDir);
$DbBak->restoreDb('mybbs');

?>